import mysql.connector

def connectDb():
    mydb = mysql.connector.connect(
        host="127.0.0.1",
        user="spider",
        port=3306,
        password="spider",
        database="spider"
    )

    return mydb

def close(mydb):
    mydb.close()
